package oo.Day04.nigthText;

public class Text {
    public static void main(String[] args) {
        person[] ps = new person[5];
        ps[0] = new Student("张三",17,"nmg","123456");
        ps[1] = new Student("李四",18,"巴西","123457");
        ps[2] = new Teacher("小三",37,"北极",1561.0);
        ps[3] = new Teacher("小四",48,"南极",7351.0);
        ps[4] = new Doctor("小王",23,"北京","主刀医师");
        for (int i=0;i<ps.length;i++){
            System.out.println(ps[i].name);
            ps[i].sayHi();
        }
    }
}
